import axios from "axios";

const BASE_URL = "http://localhost:3000";

const XIAOYU_API = {
// 获取简历数据
getResumeData: () => {
  return axios.get(`${BASE_URL}/resumes`);
},

// 获取题库数据
getQuestionData: () => {
  return axios.get(`${BASE_URL}/questions/list`);
},

// 新增题库数据(不需要带ID，后端会自动生成)
addQuestionData: (data: any) => {
  return axios.post(`${BASE_URL}/questions/add`, data);
},

// 修改题库数据(需要带ID)
updateQuestionData: (data: any) => {
  return axios.post(`${BASE_URL}/questions/update`, data);
},

// 删除题库数据
deleteQuestionData: (id: string) => {
  return axios.delete(`${BASE_URL}/questions/delete/${id}`);
},

};

export default XIAOYU_API;
